#include <bits/stdc++.h>

using namespace std;

const int MAXN = 1e5+10;

int r[MAXN]; int l = 0;

int main(){
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n; cin >> n;
    for(int i=1;i<=n;i++){
        cin >> r[i];
    }
    sort(r+1,r+n+1);
    int same = 0; int lst = 0;
    for(int i=1;i<=n;i++){
        if(i == 1){
            same++; lst = r[i];
            continue;
        } else if(r[i] == lst){
            same++;
            if(l > 0){ l--; }
        } else {
            l += same; lst = r[i];
            if(l > 0){ l--; }
            same = 1;
        }
    }
    l += same;
    cout << l;
    return 0;
}